if (NOT BLITZ_CONFIG_FILE)
    if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
        set(BZ_CONFIG_FILE "llvm")
    elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "ARMCC")
        set(BZ_CONFIG_FILE "arm")
    elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
        set(BZ_CONFIG_FILE "llvm")
    elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Cray")
        set(BZ_CONFIG_FILE "cray")
    elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
        set(BZ_CONFIG_FILE "gnu")
    elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GHS")
        set(BZ_CONFIG_FILE "ghs")
    elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "HP")
        set(BZ_CONFIG_FILE "hp")
    elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
        set(BZ_CONFIG_FILE "intel")
    elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MIPSpro")
        set(BZ_CONFIG_FILE "sgi")
    elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
        set(BZ_CONFIG_FILE "ms")
    elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "OpenWatcom")
        set(BZ_CONFIG_FILE "openwatcom")
    elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "PGI")
        set(BZ_CONFIG_FILE "pgi")
    elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "PathScale")
        set(BZ_CONFIG_FILE "pathscale")
    elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "SunPro")
        set(BZ_CONFIG_FILE "sun")
    elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "XL")
        set(BZ_CONFIG_FILE "ibm")
    elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL ".*KCC.*")
        set(BZ_CONFIG_FILE "kai")
    endif()

    set(BLITZ_CONFIG_INSTALL_DIR blitz/${BZ_CONFIG_FILE})
    set(BLITZ_CONFIG_DIR "${CMAKE_CURRENT_BINARY_DIR}/${BLITZ_CONFIG_INSTALL_DIR}")
    file(MAKE_DIRECTORY ${BLITZ_CONFIG_DIR})
    set(BLITZ_CONFIG_FILE "${BLITZ_CONFIG_DIR}/bzconfig.h")
endif()
